import Vue from 'vue'
import App from './App.vue'

//使用element-ui
import { Input ,Container,Header,Main,Aside,Row
,Col,Autocomplete,Icon,DatePicker,Image
,Tag,Footer,Pagination,Timeline,TimelineItem
,Card,Button,Empty,Divider,Upload,Menu,
MenuItem,Radio,MessageBox,Message,Select,Option,
DropdownItem,DropdownMenu,Dropdown,Tooltip,Checkbox
} from 'element-ui';
Vue.component(Input.name, Input);
Vue.component(Container.name, Container);
Vue.component(Header.name, Header);
Vue.component(Main.name, Main);
Vue.component(Aside.name, Aside);
Vue.component(Row.name, Row);
Vue.component(Col.name, Col);
Vue.component(Autocomplete.name, Autocomplete);
Vue.component(Icon.name, Icon);
Vue.component(DatePicker.name, DatePicker);
Vue.component(Image.name, Image);
Vue.component(Tag.name, Tag);
Vue.component(Footer.name, Footer);
Vue.component(Pagination.name, Pagination);
Vue.component(Timeline.name, Timeline);
Vue.component(TimelineItem.name, TimelineItem);
Vue.component(Card.name, Card);
Vue.component(Button.name, Button);
Vue.component(Empty.name, Empty);
Vue.component(Divider.name, Divider);
Vue.component(Upload.name, Upload);
Vue.component(Menu.name, Menu);
Vue.component(MenuItem.name, MenuItem);
Vue.component(Radio.name, Radio);
Vue.component(Select.name,Select);
Vue.component(Option.name,Option);
Vue.component(DropdownItem.name,DropdownItem);
Vue.component(DropdownMenu.name,DropdownMenu);
Vue.component(Dropdown.name,Dropdown);
Vue.component(Tooltip.name,Tooltip);
Vue.component(Checkbox.name,Checkbox);



Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$message = Message;







Vue.prototype.$window = window

//富文本编辑器
import VueTinymce from "@packy-tang/vue-tinymce"
Vue.use(VueTinymce)



//按钮
import MyButton from '@/components/MyButton'
Vue.component(MyButton.name, MyButton);

//导航栏--十年生死
import NavTenYear from '@/components/NavTenYear'
Vue.component(NavTenYear.name, NavTenYear);

//Footer
import FooterTenYear from '@/components/FooterTenYear'
Vue.component(FooterTenYear.name, FooterTenYear);

//gotop按钮
import GoTop from '@/components/GoTop'
Vue.component(GoTop.name, GoTop);

//AnotherFooter标签
import AnotherFooter from '@/components/AnotherFooter'
Vue.component(AnotherFooter.name, AnotherFooter);

//块预览
import SmallBlock from '@/components/SmallBlock'
Vue.component(SmallBlock.name, SmallBlock);


//富文本
import Tinymce from '@/components/Tinymce'
Vue.component(Tinymce.name, Tinymce);

//文本编辑页面
import DeailEdit from '@/components/DeailEdit'
Vue.component(DeailEdit.name, DeailEdit);

//swiper css引入
import "swiper/css/swiper.css" 

//swiper
import HomeSwiper from '@/components/HomeSwiper'
Vue.component(HomeSwiper.name, HomeSwiper);

//mock引入
// import '@/mock'

Vue.config.productionTip = false

//dayjs引入
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc'

dayjs.extend(utc)

Vue.prototype.$dayjs = dayjs;

Vue.filter('dayFix1',(day)=>{
    return dayjs.utc(day).local().format('YYYY/MM/DD HH:mm:ss')
})

Vue.filter('dayFix2',(day)=>{
  return dayjs.utc(day).local().format('YYYY/MM/DD')
})


Vue.filter('dayFix3',(day)=>{
  return dayjs.utc(day).local().format('YYYY/MM/DD HH:mm')
})

//注册路由
import router from '@/router'
import store from "@/store";

//字体图标
import '@/../public/font/icon.css'



new Vue({
  render: h => h(App),
  router,
  store,
  beforeCreate(){
    Vue.prototype.$bus = this
  },
}).$mount('#app')
